package com.daxt.common.config;

import javax.servlet.MultipartConfigElement;

import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.unit.DataSize;

@Configuration
public class UploadConfig {
	
	@Bean
	 public MultipartConfigElement multipartConfigElement() {
	    MultipartConfigFactory factory = new MultipartConfigFactory(); 
	     //上传大小
		factory.setMaxFileSize(DataSize.ofGigabytes(100)); 
	     factory.setMaxRequestSize(DataSize.ofGigabytes(100)); 
	     return factory.createMultipartConfig();
	}
}
